﻿<r:RibbonWindow 
    x:Class="t01crm.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:t01crm" 
   
    xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
    xmlns:d="clr-namespace:t01crm.Data"
    xmlns:controls="clr-namespace:t01crm.Controls;assembly=t01crm.Controls"
    xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
    xmlns:biz="clr-namespace:t01crm.Business;assembly=t01crm.Business"
    xmlns:view="clr-namespace:t01crm.View;assembly=t01crm.View"
    Background="#2E3740"
    Width="1000"
    Height="700"
    Title="t01crm Realty"
    Loaded="Window_Loaded"
    Name="MainCRMWindow">

    <r:RibbonWindow.Resources>
        <ResourceDictionary>

            <!--
    =========================================================================
    OFFICE SKIN
    =========================================================================
    -->

            <ResourceDictionary.MergedDictionaries>
                <!--<ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Blue.xaml" />-->
            </ResourceDictionary.MergedDictionaries>


            <!-- DataTemplates -->

            <DataTemplate x:Key="SimpleMenuItemTemplate" >
                <!--<MenuItem Header="{Binding}" Foreground="Black" />-->
                <TextBlock Text="{Binding}" Foreground="Black"/>
            </DataTemplate>


            <!-- Ribbon Commands -->
            <r:RibbonCommand 
      x:Key="NewProfileCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_NewProfile_Executed"
      LabelTitle="New Profile"
      ToolTipDescription="Create a new client profile."
      ToolTipTitle="New Profile"
      SmallImageSource="{StaticResource NewProfileIconDark}"
      LargeImageSource="{StaticResource NewProfileIconDark}" />
            <r:RibbonCommand 
      x:Key="SaveCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Save Profile"
      LabelDescription="Save the client's profile"
      ToolTipDescription="Save the current client profile to your disk."
      ToolTipTitle="Save Profile"
      SmallImageSource="{StaticResource SaveIconDark}"
      LargeImageSource="{StaticResource SaveIconDark}" />
            <r:RibbonCommand 
      x:Key="OpenCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Open Profile"
      LabelDescription="Open a client profile"
      ToolTipDescription="Load a client profile from your disk."
      ToolTipTitle="Open Profile"
      SmallImageSource="{StaticResource OpenIconDark}"
      LargeImageSource="{StaticResource OpenIconDark}" />
            <r:RibbonCommand 
      x:Key="PrintCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Print Profile"
      ToolTipDescription="Print the current client profile."
      ToolTipTitle="Print Profile"
      SmallImageSource="{StaticResource PrintIconDark}"
      LargeImageSource="{StaticResource PrintIconDark}" />
            <r:RibbonCommand 
      x:Key="SaveOnlineCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Save Online"
      ToolTipDescription="Save the current client profile so that it is accessible online."
      ToolTipTitle="Save Profile Online"
      SmallImageSource="{StaticResource SaveOnlineIconDark}"
      LargeImageSource="{StaticResource SaveOnlineIconDark}" />
            <r:RibbonCommand 
      x:Key="OpenOnlineCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Open Online"
      ToolTipDescription="Open a client profile from an online location."
      ToolTipTitle="Open Online Profile"
      SmallImageSource="{StaticResource OpenOnlineIconDark}"
      LargeImageSource="{StaticResource OpenOnlineIconDark}" />
            <r:RibbonCommand 
      x:Key="ViewListCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="List"
      ToolTipDescription="View the search results as a list."
      ToolTipTitle="List"
      SmallImageSource="{StaticResource ViewListIconDark}"
      LargeImageSource="{StaticResource ViewListIconDark}" />
            <r:RibbonCommand 
      x:Key="ViewMapCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Map"
      ToolTipDescription="View the search results on a map."
      ToolTipTitle="Map"
      SmallImageSource="{StaticResource ViewMapIconDark}"
      LargeImageSource="{StaticResource ViewMapIconDark}" />
            <r:RibbonCommand 
      x:Key="ViewDetailsCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Details"
      ToolTipDescription="View details for the search results."
      ToolTipTitle="Details"
      SmallImageSource="{StaticResource ViewDetailsIconDark}"
      LargeImageSource="{StaticResource ViewDetailsIconDark}" />
            <r:RibbonCommand 
      x:Key="ZoomInCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Zoom In"
      ToolTipDescription="Zoom in on the map."
      ToolTipTitle="Zoom In"
      SmallImageSource="{StaticResource ViewMapIconDark}"
      LargeImageSource="{StaticResource ViewMapIconDark}" 
      ToolTipImageSource="{StaticResource ViewMapIconDark}"/>
            <r:RibbonCommand 
      x:Key="ZoomOutCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Zoom Out"
      ToolTipDescription="Zoom out on the map."
      ToolTipTitle="Zoom Out"
      SmallImageSource="{StaticResource ViewMapIconDark}"
      LargeImageSource="{StaticResource ViewMapIconDark}" 
      ToolTipImageSource="{StaticResource ViewMapIconDark}"/>
            <r:RibbonCommand 
      x:Key="CopyPhotoCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Copy Photo"
      ToolTipDescription="Place the primary image from the selected listing on the clipboard."
      ToolTipTitle="Copy Listing Photo"
      SmallImageSource="{StaticResource CopyPhotoIconDark}"
      LargeImageSource="{StaticResource CopyPhotoIconDark}" />
            <r:RibbonCommand 
      x:Key="CopyListingCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Copy Listing"
      ToolTipDescription="Place the selected listing on the clipboard."
      ToolTipTitle="Copy Listing"
      SmallImageSource="{StaticResource CopyListingIconDark}"
      LargeImageSource="{StaticResource CopyListingIconDark}" />
            <r:RibbonCommand 
      x:Key="ContactClientCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Contact Client"
      LabelDescription="Contact the client via phone or email"
      ToolTipDescription="View options to contact the client."
      ToolTipTitle="Contact Client"
      SmallImageSource="{StaticResource FullNameIconDark}"
      LargeImageSource="{StaticResource FullNameIconDark}" />
            <r:RibbonCommand 
      x:Key="ContactInfoCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Client Contact Info"
      ToolTipDescription="View the client's contact information."
      ToolTipTitle="Client's Contact Info"
      SmallImageSource="{StaticResource FullNameIconDark}"
      LargeImageSource="{StaticResource FullNameIconDark}" />
            <r:RibbonCommand 
      x:Key="FlushMemory"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="压缩内存"
      ToolTipDescription="减少内存占用"
      ToolTipTitle="压缩内存"
      SmallImageSource="{StaticResource PhoneIconDark}"
      LargeImageSource="{StaticResource PhoneIconDark}" />
            <r:RibbonCommand 
      x:Key="Phone2Command"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Dial Phone #2"
      ToolTipDescription="Dial the client's secondary phone number."
      ToolTipTitle="Secondary Phone"
      SmallImageSource="{StaticResource PhoneIconDark}"
      LargeImageSource="{StaticResource PhoneIconDark}" />
            <r:RibbonCommand 
      x:Key="EmailCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Send Email"
      ToolTipDescription="Send an email to the client's primary email address."
      ToolTipTitle="Email Address"
      SmallImageSource="{StaticResource EmailIconDark}"
      LargeImageSource="{StaticResource EmailIconDark}" />
            <r:RibbonCommand 
      x:Key="TimeFrameCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Timeframe"
      ToolTipDescription="Enter the timeframe in which the client is expected to move."
      ToolTipTitle="Moving Timeframe"
      SmallImageSource="{StaticResource TimeframeIconDark}"
      LargeImageSource="{StaticResource TimeframeIconDark}" />
            <r:RibbonCommand 
      x:Key="LocalMoveCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Local Move"
      ToolTipDescription="Indicate whether this is a local move or a relocation."
      ToolTipTitle="Local Move"
      SmallImageSource="{StaticResource LocalMoveIconDark}"
      LargeImageSource="{StaticResource LocalMoveIconDark}" />
            <r:RibbonCommand 
      x:Key="ChildrenCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Children"
      ToolTipDescription="Inidcate whether the client will have children living in the home location."
      ToolTipTitle="Children"
      SmallImageSource="{StaticResource ChildrenIconDark}"
      LargeImageSource="{StaticResource ChildrenIconDark}" />
            <r:RibbonCommand 
      x:Key="FirstTimeBuyerCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="First Time"
      ToolTipDescription="Indicate whether the client is a first time buyer."
      ToolTipTitle="First Time Buyer"
      SmallImageSource="{StaticResource FirstTimeIconDark}"
      LargeImageSource="{StaticResource FirstTimeIconDark}" />
            <r:RibbonCommand 
      x:Key="MaximumPriceCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Maximum Price"
      ToolTipDescription="Choose the upper price limit."
      ToolTipTitle="Maximum Price"
      SmallImageSource="{StaticResource PriceIconDark}"
      LargeImageSource="{StaticResource PriceIconDark}" />
            <r:RibbonCommand 
      x:Key="MinimumPriceCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Minimum Price"
      ToolTipDescription="Choose the lower price limit."
      ToolTipTitle="Minimum Price"
      SmallImageSource="{StaticResource PriceIconDark}"
      LargeImageSource="{StaticResource PriceIconDark}" />
            <r:RibbonCommand 
      x:Key="BedroomCountCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Bedrooms"
      ToolTipDescription="Indicate the minimum number of bedrooms."
      ToolTipTitle="Bedroom Count"
      SmallImageSource="{StaticResource BedIconDark}"
      LargeImageSource="{StaticResource BedIconDark}" />
            <r:RibbonCommand 
      x:Key="BathroomCountCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Bathrooms"
      ToolTipDescription="Indicate the minimum number of bathrooms."
      ToolTipTitle="Bathroom Count"
      SmallImageSource="{StaticResource BathIconDark}"
      LargeImageSource="{StaticResource BathIconDark}" />
            <r:RibbonCommand 
      x:Key="YearCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Year Built"
      ToolTipDescription="Indicate the earliest construction year for the home."
      ToolTipTitle="Year Built"
      SmallImageSource="{StaticResource YearIconDark}"
      LargeImageSource="{StaticResource YearIconDark}" />
            <r:RibbonCommand 
      x:Key="NewConstructionCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="New Construction"
      ToolTipDescription="Only consider new construction."
      ToolTipTitle="New Construction"
      SmallImageSource="{StaticResource NewConstructionIconDark}"
      LargeImageSource="{StaticResource NewConstructionIconDark}" />
            <r:RibbonCommand 
      x:Key="HighGrowthCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="High Growth"
      ToolTipDescription="Only include homes in neighborhoods that historically have a high degree of growth."
      ToolTipTitle="High Growth Neighborhood"
      SmallImageSource="{StaticResource HighGrowthIconDark}"
      LargeImageSource="{StaticResource HighGrowthIconDark}" />
            <r:RibbonCommand 
      x:Key="NearCityCenterCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Near City"
      ToolTipDescription="Only include homes in neighborhoods that are near a city center."
      ToolTipTitle="Near City Center"
      SmallImageSource="{StaticResource CityCenterIconDark}"
      LargeImageSource="{StaticResource CityCenterIconDark}" />
            <r:RibbonCommand 
      x:Key="NearDiningCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Near Dining"
      ToolTipDescription="Only include homes in neighborhoods that are near restaurants and dining."
      ToolTipTitle="Near Restaurants and Dining"
      SmallImageSource="{StaticResource DiningIconDark}"
      LargeImageSource="{StaticResource DiningIconDark}" />
            <r:RibbonCommand 
      x:Key="NearShoppingCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Near Shopping"
      ToolTipDescription="Only include homes in neighborhoods that are near shopping areas."
      ToolTipTitle="Near Shipping"
      SmallImageSource="{StaticResource ShoppingIconDark}"
      LargeImageSource="{StaticResource ShoppingIconDark}" />
            <r:RibbonCommand 
      x:Key="RecCenterCommand"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Community Center"
      ToolTipDescription="Only include homes in neighborhoods that are near a community or recreation center."
      ToolTipTitle="Near Community Center"
      SmallImageSource="{StaticResource CommunityCenterIconDark}"
      LargeImageSource="{StaticResource CommunityCenterIconDark}" />
            <r:RibbonCommand 
      x:Key="ViewPhotoColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Photo"
      ToolTipDescription="Toggle visibility of the Photo column."
      ToolTipTitle="View Photo Column" />
            <r:RibbonCommand 
      x:Key="ViewPriceColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Price"
      ToolTipDescription="Toggle visibility of the Price column."
      ToolTipTitle="View Price Column" />
            <r:RibbonCommand 
      x:Key="ViewTitleColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Title"
      ToolTipDescription="Toggle visibility of the Title column."
      ToolTipTitle="View Title Column" />
            <r:RibbonCommand 
      x:Key="ViewBathroomsColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Bathrooms"
      ToolTipDescription="Toggle visibility of the Bathrooms column."
      ToolTipTitle="View Bathrooms Column" />
            <r:RibbonCommand 
      x:Key="ViewBedroomsColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Bedrooms"
      ToolTipDescription="Toggle visibility of the Bedrooms column."
      ToolTipTitle="View Bedrooms Column" />
            <r:RibbonCommand 
      x:Key="ViewYearColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Year"
      ToolTipDescription="Toggle visibility of the Year column."
      ToolTipTitle="View Year Column" />
            <r:RibbonCommand 
      x:Key="ViewSqrFootageColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Sqr. Footage"
      ToolTipDescription="Toggle visibility of the Sqr. Footage column."
      ToolTipTitle="View Sqr. Footage Column" />
            <r:RibbonCommand 
      x:Key="ViewAppointmentColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Appointment"
      ToolTipDescription="Toggle visibility of the Appointment column."
      ToolTipTitle="View Appointment Column" />
            <r:RibbonCommand 
      x:Key="ViewAddressColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Address"
      ToolTipDescription="Toggle visibility of the Address column."
      ToolTipTitle="View Address Column" />
            <r:RibbonCommand 
      x:Key="ViewRatingColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Rating"
      ToolTipDescription="Toggle visibility of the Rating column."
      ToolTipTitle="View Rating Column" />
            <r:RibbonCommand 
      x:Key="ViewDateUpdatedColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Date Updated"
      ToolTipDescription="Toggle visibility of the Date Updated column."
      ToolTipTitle="View Date Updated Column" />
            <r:RibbonCommand 
      x:Key="ViewDateListedColumn"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      LabelTitle="Date Listed"
      ToolTipDescription="Toggle visibility of the Date Listed column."
      ToolTipTitle="View Date Listed Column" />
            <r:RibbonCommand 
      x:Key="ApplicationButton"
      LabelTitle="Application Button"
      LabelDescription="CLose the application."
      LargeImageSource="Images\ApplicationMenuIcon.png"
      ToolTipTitle="t01crm Realty"
      ToolTipDescription="Click here to open or save a client profile, or to access a profile that has been saved online."
      ToolTipImageSource="Images\ApplicationMenuIcon.png"
      ToolTipFooterTitle="Visit www.t01crmrealty.com for more information."/>


            <r:RibbonCommand 
      x:Key="ViewSaleList"
      LabelTitle="销售清单"
      LabelDescription="显示销售列表"
      ToolTipTitle="销售列表显示"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      SmallImageSource="{StaticResource ViewListIconDark}"
      LargeImageSource="{StaticResource ViewListIconDark}"
                />

            <r:RibbonCommand 
      x:Key="ViewProdCatalog"
      LabelTitle="分类维护"
      LabelDescription="产品分类维护"
      ToolTipTitle="产品目录分类维护"
      CanExecute="RibbonCommand_CanExecute"
      Executed="RibbonCommand_Executed"
      SmallImageSource="{StaticResource ViewMapIconDark}"
      LargeImageSource="{StaticResource ViewMapIconDark}" 
                />


            <!--
    =========================================================================
    LOCAL RESOURCES
    =========================================================================
    -->

            <!-- Data -->


            <!-- Data Converters -->
            <view:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
            <view:BoolToOpacityConverter x:Key="BoolToOpacityConverter" />
            <view:ObjectToTypeName x:Key="ObjectToTypeName" />
            <view:ListingToOneLineAddress x:Key="ListingToOneLineAddress" />

            <!-- Brushes -->

            <LinearGradientBrush x:Key="Brush_DataGridDotFill" StartPoint="0,0" EndPoint="0,1">
                <GradientStop Color="#66AEEF" Offset="0"/>
                <GradientStop Color="#2B6AB3" Offset="1"/>
            </LinearGradientBrush>

            <DropShadowEffect x:Key="Effect_DotDropShadowEffect" BlurRadius="1.5" ShadowDepth=".5" Direction="-90" Opacity="0.5" />

        </ResourceDictionary>
    </r:RibbonWindow.Resources>

    <Grid SnapsToDevicePixels="True" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!-- Ribbon -->

        <r:Ribbon Title="学习系统" x:Name="ribbon" >
            <r:Ribbon.ApplicationMenu>
                <r:RibbonApplicationMenu Command="{StaticResource ApplicationButton}">
                    <r:RibbonApplicationMenu.RecentItemList>
                        <r:RibbonHighlightingList 
                    MostRecentFileSelected="ribbonApplicationMenu_MostRecentFileSelected"
                    ItemsSource="{Binding MostRecentFiles}"
                    DisplayMemberPath="Name" />
                    </r:RibbonApplicationMenu.RecentItemList>
                    <r:RibbonApplicationMenuItem Command="{StaticResource NewProfileCommand}" />
                    <r:RibbonApplicationSplitMenuItem Command="{StaticResource SaveCommand}" >
                        <r:RibbonApplicationMenuItem Command="{StaticResource SaveCommand}"/>
                        <r:RibbonApplicationMenuItem Command="{StaticResource SaveOnlineCommand}"/>
                    </r:RibbonApplicationSplitMenuItem>
                    <r:RibbonApplicationSplitMenuItem Command="{StaticResource OpenCommand}" >
                        <r:RibbonApplicationMenuItem Command="{StaticResource OpenCommand}"/>
                        <r:RibbonApplicationMenuItem Command="{StaticResource OpenOnlineCommand}"/>
                    </r:RibbonApplicationSplitMenuItem>
                    <r:RibbonApplicationMenuItem Command="{StaticResource PrintCommand}" />
                    <Separator/>
                    <r:RibbonApplicationMenuItem Command="{StaticResource ContactClientCommand}">
                        <r:RibbonApplicationMenuItem Command="{StaticResource ContactInfoCommand}"/>
                        <r:RibbonApplicationMenuItem Command="{StaticResource FlushMemory}"/>
                        <r:RibbonApplicationMenuItem Command="{StaticResource Phone2Command}"/>
                        <r:RibbonApplicationMenuItem Command="{StaticResource EmailCommand}"/>
                    </r:RibbonApplicationMenuItem>
                </r:RibbonApplicationMenu>
            </r:Ribbon.ApplicationMenu>

            <r:Ribbon.QuickAccessToolBar>
                <r:RibbonQuickAccessToolBar>
                    <r:RibbonButton Command="{StaticResource FlushMemory}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenuAndToolBar"/>
                    <r:RibbonButton Command="{StaticResource EmailCommand}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenuAndToolBar"/>
                    <r:RibbonToggleButton Command="{StaticResource HighGrowthCommand}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenuAndToolBar"/>
                    <r:RibbonToggleButton Command="{StaticResource NearCityCenterCommand}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenuAndToolBar"/>
                    <r:RibbonToggleButton Command="{StaticResource NearDiningCommand}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenu"/>
                    <r:RibbonToggleButton Command="{StaticResource NearShoppingCommand}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenu"/>
                    <r:RibbonToggleButton Command="{StaticResource RecCenterCommand}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenu"/>
                </r:RibbonQuickAccessToolBar>
            </r:Ribbon.QuickAccessToolBar>


            <r:RibbonTab Name="SearchTab" Label="Search Criteria" Selected="HackToUpdateView"
                   GroupSizeReductionOrder="HomeDetails,NeighborhoodDetails,NeighborhoodDetails,MoveDetails,Price,NeighborhoodDetails,HomeDetails,HomeDetails,Price">

                <!-- Price -->

                <r:RibbonGroup Name="Price">
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Price" 
                             SmallImageSource="{StaticResource PriceIconDark}"
                             LargeImageSource="{StaticResource PriceIconDark}" />
                    </r:RibbonGroup.Command>
                    <r:RibbonButton Command="{StaticResource MaximumPriceCommand}" />
                    <r:RibbonButton Command="{StaticResource MinimumPriceCommand}" />
                </r:RibbonGroup>

                <!-- Categories -->

                <r:RibbonGroup Name="Categories">
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Categories" 
                             SmallImageSource="{StaticResource ViewDetailsIconDark}" />
                    </r:RibbonGroup.Command>
                    <r:RibbonCheckBox Command="{StaticResource ViewTitleColumn}" 
						x:Name="TitleCheckBox" IsChecked="{Binding DataGridColumnsView.ShowTitle, Mode=TwoWay}"/>

                    <!--<r:RibbonCheckBox Command="{StaticResource ViewTitleColumn}" 
						x:Name="TitleCheckBox" IsChecked="{Binding Source={x:Static view:DesignTimeViewModel.DataGridColumnsView}, Path=ShowTitle, Mode=TwoWay}"/>-->

                    <r:RibbonCheckBox Command="{StaticResource ViewPriceColumn}" x:Name="PriceCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewBedroomsColumn}" x:Name="BedroomsCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewBathroomsColumn}" x:Name="BathroomsCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewPhotoColumn}" x:Name="PhotoCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewYearColumn}" x:Name="YearCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewSqrFootageColumn}" x:Name="SqrFootageCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewAppointmentColumn}" x:Name="AppointmentCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewRatingColumn}" x:Name="RatingCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewAddressColumn}" x:Name="AddressCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewDateListedColumn}" x:Name="DateListedCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                    <r:RibbonCheckBox Command="{StaticResource ViewDateUpdatedColumn}" x:Name="DateUpdatedCheckBox" Checked="RibbonCheckBox_Checked" Unchecked="RibbonCheckBox_Unchecked"/>
                </r:RibbonGroup>

                <!-- Home Details -->

                <r:RibbonGroup Name="HomeDetails">
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Home Details" 
                             SmallImageSource="{StaticResource BedIconDark}"/>
                    </r:RibbonGroup.Command>
                    <r:RibbonDropDownButton Command="{StaticResource BedroomCountCommand}" 
				ItemsSource="{x:Static biz:FilterMetadata.Rooms}" 
				ItemTemplate="{StaticResource SimpleMenuItemTemplate}">
                    </r:RibbonDropDownButton>
                    <r:RibbonDropDownButton Command="{StaticResource BathroomCountCommand}" 
            ItemsSource="{x:Static biz:FilterMetadata.BathRooms}" 
            ItemTemplate="{StaticResource SimpleMenuItemTemplate}">

                    </r:RibbonDropDownButton>
                    <r:RibbonDropDownButton Command="{StaticResource YearCommand}" >
                        <MenuItem Header="Pre-1900"/>
                        <MenuItem Header="1900-1950"/>
                        <MenuItem Header="1950-1970"/>
                        <MenuItem Header="1970's"/>
                        <MenuItem Header="1980's"/>
                        <MenuItem Header="1990's"/>
                        <MenuItem Header="Post-2000"/>
                    </r:RibbonDropDownButton>
                    <r:RibbonToggleButton Command="{StaticResource NewConstructionCommand}" />
                </r:RibbonGroup>

                <!-- Neighborhood Details -->

                <r:RibbonGroup Name="NeighborhoodDetails">
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Neighborhood Details" 
                             SmallImageSource="{StaticResource CityCenterIconDark}"/>
                    </r:RibbonGroup.Command>
                    <r:RibbonToggleButton Command="{StaticResource HighGrowthCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource NearCityCenterCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource NearDiningCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource NearShoppingCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource RecCenterCommand}" />
                </r:RibbonGroup>

                <!-- Move Details -->

                <r:RibbonGroup Name="MoveDetails">
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Move Details" 
                             SmallImageSource="{StaticResource TimeframeIconDark}"/>
                    </r:RibbonGroup.Command>
                    <r:RibbonGroup.GroupSizeDefinitions>
                        <r:RibbonGroupSizeDefinitionCollection>
                            <r:RibbonGroupSizeDefinition>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                                <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                            </r:RibbonGroupSizeDefinition>
                            <r:RibbonGroupSizeDefinition IsCollapsed="True"/>
                        </r:RibbonGroupSizeDefinitionCollection>
                    </r:RibbonGroup.GroupSizeDefinitions>
                    <r:RibbonToggleButton Command="{StaticResource TimeFrameCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource LocalMoveCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource ChildrenCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource FirstTimeBuyerCommand}" />
                </r:RibbonGroup>

            </r:RibbonTab>

            <r:RibbonTab Name="SearchResults" Label="Search Results" Selected="HackToUpdateView">

                <!-- View -->

                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Results View" />
                    </r:RibbonGroup.Command>
                    <r:RibbonToggleButton Command="{StaticResource ViewListCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource ViewDetailsCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource ViewMapCommand}" />
                </r:RibbonGroup>

                <!-- Clipboard -->

                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="Clipboard" />
                    </r:RibbonGroup.Command>
                    <r:RibbonButton Command="{StaticResource CopyPhotoCommand}" />
                    <r:RibbonButton Command="{StaticResource CopyListingCommand}" />
                </r:RibbonGroup>

            </r:RibbonTab>


            <r:RibbonTab Name="SaleTab" Label="销售" Selected="HackToUpdateView">
                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="销售列表功能" />
                    </r:RibbonGroup.Command>
                    <r:RibbonToggleButton Command="{StaticResource ViewSaleList}" />
                    <r:RibbonToggleButton Command="{StaticResource ViewDetailsCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource ViewMapCommand}" />
                </r:RibbonGroup>
            </r:RibbonTab>
            <r:RibbonTab Name="BasicTab" Label="基础数据" Selected="HackToUpdateView">
                <r:RibbonGroup>
                    <r:RibbonGroup.Command>
                        <r:RibbonCommand LabelTitle="产品" />
                    </r:RibbonGroup.Command>
                    <r:RibbonToggleButton Command="{StaticResource ViewProdCatalog}" />
                    <r:RibbonToggleButton Command="{StaticResource ViewDetailsCommand}" />
                    <r:RibbonToggleButton Command="{StaticResource ViewMapCommand}" />
                </r:RibbonGroup>
            </r:RibbonTab>

            <r:Ribbon.ContextualTabGroups>
                <r:RibbonContextualTabGroup Name="MapContextualGroup" Label="Map">
                    <r:RibbonTab Label="Map Controls">
                        <r:RibbonGroup>
                            <r:RibbonGroup.Command>
                                <r:RibbonCommand LabelTitle="Zoom"/>
                            </r:RibbonGroup.Command>
                            <r:RibbonButton Command="{StaticResource ZoomInCommand}"/>
                            <r:RibbonButton Command="{StaticResource ZoomOutCommand}"/>
                        </r:RibbonGroup>
                    </r:RibbonTab>
                </r:RibbonContextualTabGroup>
                <r:RibbonContextualTabGroup Name="ProfileContextualGroup" Label="Client Profile" >
                    <r:RibbonTab Name="ClientProfile" Label="Profile" >
                        <!-- Profiles -->
                        <r:RibbonGroup>
                            <r:RibbonGroup.GroupSizeDefinitions>
                                <r:RibbonGroupSizeDefinitionCollection>
                                    <r:RibbonGroupSizeDefinition>
                                        <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                                        <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                                        <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                                    </r:RibbonGroupSizeDefinition>
                                </r:RibbonGroupSizeDefinitionCollection>
                            </r:RibbonGroup.GroupSizeDefinitions>
                            <r:RibbonButton Command="{StaticResource SaveCommand}" />
                            <r:RibbonButton Command="{StaticResource OpenCommand}" />
                            <r:RibbonButton Command="{StaticResource PrintCommand}" />
                        </r:RibbonGroup>


                        <!-- Contact Information -->

                        <!--<r:RibbonGroup>
					<r:RibbonGroup.Command>
						<view:RibbonItem LabelTitle="Contact Information" />
					</r:RibbonGroup.Command>
					<r:RibbonGroup.GroupSizeDefinitions>
						<r:RibbonGroupSizeDefinitionCollection>
							<r:RibbonGroupSizeDefinition>
								<r:RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True"/>
								<r:RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True"/>
								<r:RibbonControlSizeDefinition ImageSize="Small" IsLabelVisible="True"/>
							</r:RibbonGroupSizeDefinition>
						</r:RibbonGroupSizeDefinitionCollection>
					</r:RibbonGroup.GroupSizeDefinitions>
					<r:RibbonTextBox Command="{StaticResource FullNameCommand}" Width="280" />
					<r:RibbonTextBox Command="{StaticResource Phone1Command}" Width="180" />
					<r:RibbonTextBox Command="{StaticResource EmailCommand}" Width="240" />
				</r:RibbonGroup>-->

                        <!-- Online Profiles -->

                        <r:RibbonGroup>
                            <r:RibbonGroup.Command>
                                <view:RibbonItem LabelTitle="Online Profiles" />
                            </r:RibbonGroup.Command>
                            <r:RibbonGroup.GroupSizeDefinitions>
                                <r:RibbonGroupSizeDefinitionCollection>
                                    <r:RibbonGroupSizeDefinition>
                                        <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                                        <r:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True"/>
                                    </r:RibbonGroupSizeDefinition>
                                </r:RibbonGroupSizeDefinitionCollection>
                            </r:RibbonGroup.GroupSizeDefinitions>
                            <r:RibbonButton Command="{StaticResource SaveOnlineCommand}" />
                            <r:RibbonButton Command="{StaticResource OpenOnlineCommand}" />
                        </r:RibbonGroup>
                    </r:RibbonTab>
                </r:RibbonContextualTabGroup>
            </r:Ribbon.ContextualTabGroups>

        </r:Ribbon>

        <Image Source="{StaticResource HorizontalLogo}" Stretch="Uniform" Height="22" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,28,10,0" />

        <!-- DataGrid -->
        <!-- ItemsSource="{Binding Source={StaticResource listingsViewSource}}"-->
        <Grid x:Name="MainContent" Grid.Row="1">



        </Grid>
    </Grid>
</r:RibbonWindow>
